<template>
  <div>
    <p>欢迎光临_Vue开发的收银系统_水果店</p>
    苹果{{money}}￥/斤，折扣{{discount}}折<br>
    请输入你要购买的斤数<input v-model="eii">
    <button @click="moneyAdd">结账买单</button>
    结账单:总价{{dtp}}￥元 折后价{{ad}}￥元 省了:{{tsm}}￥元
  </div>
</template>

<script>
export default {
  name: 'VuecliTwoApp',

  data() {
    return {
eii:0,
      money:10,
      discount:8,
     ad:0,
     dtp:0,
     tsm:0
   

    };
  },

  mounted() {
    
  },

  methods: {
    moneyAdd(){
      this.dtp=10*this.eii,
      this.ad=8*this.eii
      this.tsm=this.dtp-this.ad

     this.eii*8
    }
  },
};
</script>

<style lang="scss" scoped>

</style>